// 预警模块管理
import request from '@/utils/axios'
import {
  URL_API
} from '@/utils/mUtils'
const base = URL_API()


//获取下拉框选项
export function reqDictionaryOptions(params) {
  return request({
    url: `${base}/api/dictionary/options`,
    method: 'post',
    data: params,

  })
}

//获取预警内容下拉
export function EarlywarningOptions(params) {
  return request({
    url: `${base}/api/earlywarning/template/options`,
    method: 'post',
    data: params,

  })
}

// 超时规则设置
// 预警规则列表
export function OverRuleList(params) {
  return request({
    url: `${base}/api/earlywarning/rule/list`,
    method: 'post',
    data: params,

  })
}

// 创建规则
export function AddOvertime(params) {
  return request({
    url: `${base}/api/earlywarning/rule/create`,
    method: 'post',
    data: params,

  })
}
// 修改规则
export function AmendOvertime(params) {
  return request({
    url: `${base}/api/earlywarning/rule/update`,
    method: 'put',
    data: params,

  })
}
// 删除规则
export function DeleteOvertime(params) {
  return request({
    url: `${base}/api/earlywarning/rule/delete`,
    method: 'delete',
    data: params,

  })
}
// 创建预警内容
export function AddOverContent(params) {
  return request({
    url: `${base}/api/earlywarning/template/create`,
    method: 'post',
    data: params,

  })
}
// 预警内容列表
export function OverContentList(params) {
  return request({
    url: `${base}/api/earlywarning/template/list`,
    method: 'post',
    data: params,

  })
}
// 修改预警内容
export function AmendOverContent(params) {
  return request({
    url: `${base}/api/earlywarning/template/update`,
    method: 'put',
    data: params,

  })
}
// 删除预警内容
export function deleteOverContent(params) {
  return request({
    url: `${base}/api/earlywarning/template/delete`,
    method: 'delete',
    data: params,

  })
}
// 超时预警记录
// 搜索超时预警
export function SearchOverContent(params) {
  return request({
    url: ``,
    method: '',
    data: params,
  })
}
// 预警记录列表
export function overRecordList(params) {
  return request({
    url: `${base}/api/earlywarning/record/list`,
    method: 'post',
    data: params,

  })
}
// 超温预警记录
// 超温预警搜索
export function SearchOverheat(params) {
  return request({
    url: ``,
    method: '',
    data: params,
  })
}

//获取承运产品类型
export function getTransportsList(params) {
  return request({
    url: `${base}/api/transportType/options`,
    method: "post",
    data: params,

  });
}

// 超时规则详情
export function EarlywarningDetail(params) {
  return request({
    url: `${base}/api/earlywarning/rule/detail`,
    method: "post",
    data: params,

  });
}

// 断电离线预警
export function TemplateDetail(params) {
  // // console.log(params,"(val.id")
  return request({
    url: `${base}/api/earlywarning/template/detail`,
    method: "post",
    data: params,
  });
}

// 预警记录 受理  
export function EarlywarningRecordDeal(params) {
  return request({
    url: `${base}/api/earlywarning/record/deal`,
    method: "post",
    data: params,

  });
}
// 智能盯控 列表接口
export function InRoadWaybill(params) {
  return request({
    url: `${base}/api/intelligent/in_road_waybill`,
    method: "post",
    data: params,

  });
}
// 智能盯控开关接口 
export function TimingTask(params) {
  return request({
    url: `${base}/api/intelligent/timing_task`,
    method: "post",
    data: params,

  });
}
// 智能盯控信息接口
export function WarningWaybillInfo(params) {
  return request({
    url: `${base}/api/intelligent/warning_waybill_info`,
    method: "post",
    data: params,

  });
}
// 通知角色下拉
export function noticeoptions(params) {
  return request({
    url: `${base}/api/earlywarning/notice/options`,
    method: "post",
    data: params,

  });
}
// 记录详情
export function recordDetail(params) {
  return request({
    url: `${base}/api/earlywarning/record/detail`,
    method: "post",
    data: params,

  });
}